/**
 * 
 */
package steffen.java.utils.menu.option;


/**
 * @author Steffen Baumann
 * @version 1.0 
 *
 */
public final class PredefinedOption implements MenuOption{

	private String optionName = "";
	private String optionDescription = "";
	private String command = "";
	
	private static PredefinedOption exit = null;
	private static PredefinedOption cancel = null;
	private static PredefinedOption help = null;
	
	/**
	 * 
	 */
	private PredefinedOption(String optionName, String optionDescription, String command) {
		this.optionName = optionName;
		this.optionDescription = optionDescription;
		this.command = command;
	}
	/**
	 * @return the optionName
	 */
	@Override
	public String getOptionName() {
		return optionName;
	}
	/**
	 * @return the optionDescription
	 */
	@Override
	public String getOptionDescription() {
		return optionDescription;
	}
	/**
	 * @return the command
	 */
	@Override
	public String getCommand() {
		return command;
	}
	public static PredefinedOption getExitOption(){
		if(exit == null){
			exit = new PredefinedOption("Exit", "Closes the menu", "exit");
		}
		return exit;
	}
	public static PredefinedOption getCancelOption(){
		if(cancel == null){
			cancel = new PredefinedOption("Cancel", "Returns to the previos menu", "canc");
		}
		return cancel;
	}
	public static PredefinedOption getHelpOption(){
		if(help == null){
			help = new PredefinedOption("Help", "Prints the help", "help");
		}
		return help;
	}

}
